﻿
// WorklistServerDlg.h: 头文件
//

#pragma once

#include "CWLServer.h"

#define UM_ADD_LOG      WM_USER + 10
#define UM_SERVER_START WM_USER + 20
#define UM_SERVER_STOP  WM_USER + 30

// CWorklistServerDlg 对话框
class CWorklistServerDlg : public CDialogEx
{
// 构造
public:
	CWorklistServerDlg(CWnd* pParent = nullptr);	// 标准构造函数

// 对话框数据
#ifdef AFX_DESIGN_TIME
	enum { IDD = IDD_WORKLISTSERVER_DIALOG };
#endif

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV 支持


// 实现
protected:
	HICON m_hIcon;
	CBrush m_brBlack;

	// 生成的消息映射函数
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnBnClickedButtonStart();
	afx_msg void OnBnClickedButtonDir();
	afx_msg void OnBnClickedButtonDefdir();
	afx_msg void OnBnClickedButtonClearLog();
	afx_msg LRESULT OnAddLog(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnServerStart(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnServerStop(WPARAM wParam, LPARAM lParam);
	afx_msg void OnSelchangeComboLl();
	afx_msg void OnGetMinMaxInfo(MINMAXINFO* lpMMI);
	afx_msg void OnDestroy();
	DECLARE_MESSAGE_MAP()

protected:
	void addLog(CString str);
	void Arrange();

private:
	CWLServer m_wlServer;
	UINT m_port;
	CString m_aet;
	CString m_sourceFile;
	CComboBox m_cmbLL;
	CEdit m_log;
};
